package com.example.ioc.factorybean;

import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.concurrent.CountDownLatch;

@SpringBootApplication
public class DemoApplication {

    @SneakyThrows
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(DemoApplication.class, args);
        DefaultSoaService soaService = context.getBean(DefaultSoaService.class);
        soaService.getServiceName();
        CountDownLatch countDownLatch = new CountDownLatch(1);
        countDownLatch.await();
    }

}
